﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;

namespace WCS.Infrastructure.EFCore;

/// <summary>
/// 门店表
/// </summary>
[Table("Store")]
[Index("MerchantId", Name = "Store_MerchantId_idx")]
[Index("StoreCode", Name = "Store_StoreCode_idx", IsUnique = true)]
public partial class Store
{
    /// <summary>
    /// 门店ID
    /// </summary>
    [Key]
    [StringLength(32)]
    public string Id { get; set; } = null!;

    /// <summary>
    /// 门店编号
    /// </summary>
    [StringLength(64)]
    public string StoreCode { get; set; } = null!;

    /// <summary>
    /// 门店名称
    /// </summary>
    [StringLength(255)]
    public string Name { get; set; } = null!;

    /// <summary>
    /// 门店类型
    /// </summary>
    public int StoreType { get; set; }

    /// <summary>
    /// 门店地址
    /// </summary>
    [StringLength(255)]
    public string? Address { get; set; }

    /// <summary>
    /// 门店详细地址
    /// </summary>
    [StringLength(512)]
    public string? DetailedAddress { get; set; }

    /// <summary>
    /// 商户ID
    /// </summary>
    [StringLength(32)]
    public string MerchantId { get; set; } = null!;

    /// <summary>
    /// 联系人名称
    /// </summary>
    [StringLength(100)]
    public string? ContactPerson { get; set; }

    /// <summary>
    /// 联系电话
    /// </summary>
    [StringLength(11)]
    public string? ContactPhone { get; set; }

    /// <summary>
    /// 结算周期
    /// </summary>
    public int? SettlementCycle { get; set; }

    /// <summary>
    /// 扩展属性
    /// </summary>
    public string? ExtraProperties { get; set; }

    /// <summary>
    /// 并发标记
    /// </summary>
    [StringLength(40)]
    public string? ConcurrencyStamp { get; set; }

    /// <summary>
    /// 创建时间
    /// </summary>
    [Column(TypeName = "timestamp(6) without time zone")]
    public DateTime CreationTime { get; set; }

    /// <summary>
    /// 创建人ID
    /// </summary>
    [StringLength(32)]
    public string? CreatorId { get; set; }

    /// <summary>
    /// 最后修改时间
    /// </summary>
    [Column(TypeName = "timestamp(6) without time zone")]
    public DateTime? LastModificationTime { get; set; }

    /// <summary>
    /// 最后修改人ID
    /// </summary>
    [StringLength(32)]
    public string? LastModifierId { get; set; }

    /// <summary>
    /// 是否删除
    /// </summary>
    public bool IsDeleted { get; set; }

    /// <summary>
    /// 删除者ID
    /// </summary>
    [StringLength(32)]
    public string? DeleterId { get; set; }

    /// <summary>
    /// 删除时间
    /// </summary>
    [Column(TypeName = "timestamp(6) without time zone")]
    public DateTime? DeletionTime { get; set; }

    /// <summary>
    /// 启用状态
    /// </summary>
    public int EnableStatus { get; set; }

    /// <summary>
    /// 缩略图Url
    /// </summary>
    [StringLength(255)]
    public string? ThumbnailUrl { get; set; }

    /// <summary>
    /// 经纬度
    /// </summary>
    [StringLength(32)]
    public string? Location { get; set; }
}
